<include file="__THEME__/public_header" />
<div id="page-wrap">
  <div id="main-wrap">
    <div id="col"> <include file="search_top" /> </div>
    <div id="col8" class="post-circle clearfix"> 
      <!---搜帖子-->
      <div class="post-list">
        <php>if($searchResult['data']){</php>
        <ul>
          <volist name="searchResult['data']" id="vo">
            <li class="clearfix">
              <h3 class="post-tit"> <a href="{:U('weiba/Index/postDetail',array('post_id'=>$vo['post_id']))}"><span>{$vo.title|getShort=14}</span></a>
                <if condition="$vo['digest'] eq 1"><i class="ico-essence"></i></if>
                <if condition="$vo['top'] eq 2"><i class="ico-toTop"></i></if>
              </h3>
              <p class="post-prof"><a href="{:U('weiba/Index/postDetail',array('post_id'=>$vo['post_id']))}">{$vo.content|t|getShort=100}...</a></p>
              <if condition="count($vo['img']) neq '0'">
                <div class="post-img clearfix mb20">
                  <if condition="$vo['img'][0] neq ''">
                    <div class="post-img"><img src="{$vo['img'][0]}"/></div>
                  </if>
                  <if condition="$vo['img'][1] neq ''">
                    <div class="post-img"><img src="{$vo['img'][1]}"/></div>
                  </if>
                  <if condition="$vo['img'][2] neq ''">
                    <div class="post-img"><img src="{$vo['img'][2]}"/></div>
                  </if>
                </div>
              </if>
              <div class="post-info f8">
                <div class="left"><a class="weiba-name" href="{:U('weiba/Index/detail',array('weiba_id'=>$vo['weiba_id']))}"><span>{$vo.weiba|getShort=5}</span></a></div>
                <div class="right post-info-control"> <span>{$vo.user.space_link}{$vo.post_time|friendlyDate}发布</span><span title="浏览"><i class="i-post-scan"></i>({$vo.read_count})</span> <span title="评论"><i class="i-post-comment"></i>({$vo.reply_count})</span>
                  <eq name="vo['digg']" value="undigg">
                  <span title="赞" >
                  </eq>
                  <eq name="vo['digg']" value="digg">
                  <span title="赞">
                  </eq>
                  <i class="i-post-alike"></i>({$vo.praise})</span> </div>
              </div>
            </li>
          </volist>
        </ul>
        <php>}else{</php>
        <div class="note">没有搜到相应信息！</div>
        <php>}</php>
      </div>
      <div id="page" class="page"> {$searchResult.html} </div>
    </div>
  </div>
</div>
<include file="__THEME__/public_footer" /> 
<script>
  var selectDate = function(){
    var app = $('#app').val();
    var mod = $('#mod').val();
    var t = $('#t').val();
    var a = $('#a').val();
    var k = "{$keyword}";
    var feed_type = "{$feed_type}";
    ui.box.load(U('public/Search/selectDate')+'&app='+app+'&mod='+mod+'&t='+t+'&a='+a+'&k='+encodeURI(k)+'&feed_type='+feed_type, '时间筛选','$("#rcalendar").css("display","none")');
  };

/**
 * 时间更新效果
 * return void
 */
$(document).ready(function() {
  var formatTime = '';
  $('.date').bind({
    mouseover: function() {
      $(this).find('em').first().hide();
      var width = $(this).find('em').first().width();
      $(this).find('em').last().css({display:'inline', width: width});
    },
    mouseout: function() {
      $(this).find('em').first().show();
      $(this).find('em').last().hide();
    }
  });

  var wTime = parseInt("{:time()}");
  var updateTime = function()
  {
    $('.date').each(function(i, n) {
      var date = $(this).attr('date');
      if(typeof date !== 'undefined') {
        $(this).find('em').first().html(core.weibo.friendlyDate(date, wTime));
      }
    }); 
  };
  //updateTime();
  setInterval(function() {
    wTime += 10;
    updateTime();
  }, 10000);
});
</script> 
<script type="text/javascript" src="__THEME__/js/module.weibo.js"></script> 
